<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta name="google" value="notranslate" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <title>{$Think.config.app.Title ?? ''}</title>
    <link rel="stylesheet" type="text/css" href="/static/css/index.css" />
    <link rel="stylesheet" type="text/css" href="/static/css/leftmenu_new.css" />
    <link rel="stylesheet" type="text/css" href="/static/css/fontawesome6.4.0/all.min.css" />
    
    <script type="text/javascript" src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript" src="/static/js/layer/layer.js"></script>
    <script type="text/javascript" src="/static/js/select/jquery.selectex.js"></script>
    <script type="text/javascript" src="/static/js/public.core.js"></script>
</head>

<body>
    <div class="index-header">
        <img class="chexun-logo" src="/static/images/logo.png" />
        <div class="user-info w144_resize">
            <div class="user-icon-box">
                <a class="user-ico"></a>
                <div class="userinfo-content disn" cell-role="content">
                    <p title="{$_G['member']['realname'] ?? ''} 欢迎您">{$_G['member']['realname'] ?? ''}&nbsp; 欢迎您！</p>
                </div>
            </div>

            <div class="switch-system">
                <span class="sys-tit" title="{$Think.config.app.Title ?? ''}" style="max-width:100%;">{$Think.config.app.Title ?? ''}</span>
            </div>

            <a class="self-set" title="个人设置" href="/index.profile" target="mainIframe"></a>
            <a class="quit-out" title="退出登录" href="/quit"></a>

            <div class="user-content" cell-role="content">
                <p title="{$_G['member']['realname'] ?? ''} 欢迎您">{$_G['member']['realname'] ?? ''}&nbsp; 欢迎您！</p>
                <div class="userlink">
                    <a href="/index.profile" target="mainIframe">个人设置</a>
                    <a href="/quit">退出登录</a>
                </div>
            </div>
        </div>
    </div>
    <div class="layout">
        <div class="leftmenu">
            <div class="leftmenu-sub">
                <a class="leftmenu-cell current" data-key="home" href="/index.home" target="mainIframe"><i class="fa fa-home"></i><span>工作台</span></a>
                <!--{if $_C->auth(1,'order')}-->
                <!--a class="leftmenu-cell" href="/order.index" target="mainIframe"><i class="fas fa-file-word"></i><span>订单</span></a-->
                <!--{/if}-->
                <!--{if $_C->auth([1,2],'user')}-->
                <a class="leftmenu-cell" data-key="user" target="mainIframe"><i class="fa fa-user-friends"></i><span>用户</span></a>
                <!--{/if}-->
                <!--{if $_C->auth([1,2,3,4],'channel')}-->
                <a class="leftmenu-cell" data-key="channel" href="/channel.channel" target="mainIframe"><i class="fa fa-sitemap"></i><span>门店管理</span></a>
                <!--{/if}-->
                <!--{if $_C->auth([1,2,3,4],'partner')}-->
                <a class="leftmenu-cell" data-key="partner" target="mainIframe"><i class="fa fa-hands-helping"></i><span>合伙人管理</span></a>
                <!--{/if}-->
                
                <!--{if $_C->auth([1,2],'finance')}-->
                <a class="leftmenu-cell" data-key="finance" target="mainIframe"><i class="fa fa-money-check-alt"></i><span>财务管理</span></a>
                <!--{/if}-->
                <!--{if $_C->auth([1,2],'devops')}-->
                <a class="leftmenu-cell" data-key="devops" target="mainIframe"><i class="fa fa-desktop"></i><span>运维</span></a>
                <!--{/if}-->
            </div>
            <div class="tack-menu">
                <div class="copyright-info">
                    <a class="copyright">copyright</a>
                    <div class="copyright-content">
                        <div class="cp-logo" style="display: none;">
                            <img src="/static/images/copyright-logo.png" />
                        </div>
                        <div class="cp-font">Copyright &copy<br/>  2023 {$Think.config.app.APPDomain ?? ''}<br/> 版权所有</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="submenu-list l-scrollbar disn">
            <div class="list-colunm">
                <!--{if $_C->auth([1,2],'user')}-->
                <ul class="colunm-ul" data-key="user">
                    <!--{if $_C->auth(1,'user')}-->
                    <li><a href="/user.group/index" target="mainIframe">角色</a></li>
                    <!--{/if}-->
                    <!--{if $_C->auth(2,'user')}-->
                    <li><a href="/user.index/index" target="mainIframe">运营人员管理</a></li>
                    <!--{/if}-->
                </ul>
                <!--{/if}-->
                <!--{if $_C->auth([1,2,3,4],'partner')}-->
                <ul class="colunm-ul" data-key="partner">
                    <!--{if $_C->auth(1,'partner')}-->
                    <li><a href="/partner.partner/index" target="mainIframe">合伙人管理</a></li>
                    <!--{/if}-->
                    <!--{if $_C->auth(2,'partner')}-->
                    <li><a href="/partner.transaction/index" target="mainIframe">账户资金流水</a></li>
                    <!--{/if}-->
                    <!--{if $_C->auth([3,4],'partner')}-->
                    <li><a href="/partner.withdraw/index" target="mainIframe">合伙人提现申请</a></li>
                    <!--{/if}-->
                </ul>
                <!--{/if}-->
                
                <!--{if $_C->auth([1,2],'finance')}-->
                <ul class="colunm-ul" data-key="finance">
                    <li><a href="/finance.payment/index" target="mainIframe">支付流水</a></li>
                    <li><a href="/finance.settle/index" target="mainIframe">财务结算</a></li>
                </ul>
                <!--{/if}-->
                <!--{if $_C->auth([1,2],'devops')}-->
                <ul class="colunm-ul" data-key="devops">
                    <!--{if $_C->auth(1,'devops')}-->
                    <li><a href="/devops.vip/index" target="mainIframe">VIP售卖方案</a></li>
                    <!--{/if}-->
                    <!--{if $_C->auth(2,'devops')}-->
                    <li><a href="/devops.group/index" target="mainIframe">门店角色</a></li>
                    <!--{/if}-->
                </ul>
                <!--{/if}-->
            </div>
        </div>
        <div class="fixed-arrowbar toggle-layout"></div>
        <div class="main">
            <iframe id="mainIframe" name="mainIframe" width="100%" height="100%" frameborder="0"></iframe>
        </div>
    </div>
<script src="/static/{$Think.config.app.APPSKEY ?? ''}/js/common.js"></script>
<script type="text/javascript">
Core.Sys.lodSubmenu =  function(dkey){        
    var ul = $('div.list-colunm ul[data-key="'+dkey+'"]');        
    $('.user-info').removeClass("w144_resize").removeClass("w62_resize");
    $('.submenu-list div.list-colunm ul.colunm-ul').hide();

    if (!ul.length) {
        $('.user-info').addClass("w62_resize");
        $('.submenu-list').addClass('disn');
    } else {
        ul.show();
        $('.submenu-list').removeClass('disn');
        $(".submenu-list").find("a.active").removeClass('active');
        
        ul.find('a:first').addClass('active');
        if(ul.find("a.active").length){
            $('#mainIframe').attr('src', ul.find("a.active").attr('href'));
        }
    }
    return;
}

$(function () {
    
    var $lay = $(".layout");
    $(".toggle-layout").on("click",function(){
        $('.user-info').toggleClass("w144_resize");
        $lay.toggleClass("mini-resize-toggle");
    });
    //加载菜单
    Core.Sys.lodSubmenu($('.leftmenu a.leftmenu-cell').eq(0).attr('data-key'));

    //w62时鼠标在头像上提示欢迎您
    $(".user-info").find('.user-icon-box').on("mouseenter",function(){
        if(!$(this).parent('.user-info').hasClass('w62_resize')){return false}
        $(this).find('div[cell-role="content"]').removeClass('disn');
    }).on("mouseleave",function(){
        if(!$(this).parent('.user-info').hasClass('w62_resize')){return false}
        $(this).find('div[cell-role="content"]').addClass('disn');
    });
    

    //切换系统通道
    $(".switch-system").on("mouseenter",function(){
        $(this).find('div[cell-role="content"]').removeClass('disn');
    }).on("mouseleave",function(){
        $(this).find('div[cell-role="content"]').addClass('disn');
    });

    $(".switch-content").on("click","a",function(){
        $(this).parents('div[cell-role="content"]').addClass('disn');
    });
    
    //一级菜单切换
    $('.leftmenu a.leftmenu-cell').click(function(){
        $(this).parent('div').find('a.leftmenu-cell').removeClass('current');
        $(this).addClass('current');

        var dkey = $(this).attr('data-key');
        Core.Sys.lodSubmenu(dkey);
    });

    //二级菜单切换
    $(".submenu-list").on("click", ".menu-more", function () {
        $(this).toggleClass("open");
    })
    $(".submenu-list").on("click", "a", function () {
        $(".submenu-list").find("a.active").removeClass("active");
        $(this).addClass("active");
    })
})
</script>
</body>
</html>